<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial - scale=1.0">
    <link rel="stylesheet" href="../static/css/behindManager.css" th:href="@{/css/behindManager.css}">
    <link rel="stylesheet" href="../static/css/iconfont.css" th:href="@{/css/iconfont.css}">
    <link rel="stylesheet" href="../static/css/confirm.css" th:href="@{/css/confirm.css}">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <title>用户管理系统</title>
</head>
<body>
<div class="container">
<div class="box">
    <div class="nav-container">
        <div class="logo">
            <img src="../static/img/logo.png" alt="Ant Design Pro" th:src="@{/img/logo.png}">
            <p class="name">Haven Manager</p>
        </div>
        <div class="user-info">
            <span class="username">后台管理</span>
        </div>
        <ul class="nav">
            <li><a href="http://localhost:8080/admin/behindManagerUser" th:href="@{/admin/behindManagerUser}"  data-target="adminManagement" class="nav-link active">用户管理</a></li>
            <li><a href="http://localhost:8080/admin/behindManagerPost" th:href="@{/admin/behindManagerPost}" data-target="systemManagement" class="nav-link">帖子管理</a></li>
            <li><a href="http://localhost:8080/admin/behindManagerCategory" th:href="@{/admin/behindManagerCategory}" data-target="kindManagement" class="nav-link">类别管理</a></li>
            <li><a href="http://localhost:8080/admin/behindManagerReport" th:href="@{/admin/behindManagerReport}" data-target="jubaoManager" class="nav-link">举报管理</a></li>
        </ul>
    </div>
    <a href="http://localhost:8080/mainPageRecommend" th:href="@{/mainPageRecommend}" style="position: static"><button class="back" style="z-index: 100">返回首页</button></a>
    <a href="" class="person"><img src="../static/img/image1.png " alt=""  th:src="${admin.avatar}">
        <div class="admin-name" th:text="${admin.username}"></div></a>
    <div id="adminManagement" class="content active">
        <div class="forms">
        <button id="check-button">全部删除</button>
        <button id="addButton" class="add-button">添加</button>
        <input type="text" id="check" class="checked" placeholder="请输入昵称">
        <button id="checkkey-button" class="add-button">查询</button>
        <button id="batchMuteall">禁言</button>
        <button id="batchUnmuteall">解禁</button>
        <div><i class="iconfont" id="backform" >&#xe61b;</i></div>
        <table class="adminManagement-table">
            <thead>
            <tr>
                <th><input type="checkbox" class="selectAll"></th>
                <th>头像</th>
                <th>昵称</th>
                <th>邮箱</th>
                <th>密码</th>
                <th>性别</th>
                <th>状态</th>
                <th>操作</th>
                <th></th>
            </tr>
            </thead>
            <div>
                <p id="notice" style="position: absolute;top: 300px;left: 400px;font-size: 22px;font-weight: 700; display: none">没有找到该用户</p>
            </div>
            <tbody id="table-body">
            <tr th:each="user : ${userList}"  th:data-user-id="${user.id}">
                <td><input type="checkbox" class="rowCheckbox" th:data-user-id="${user.id}"></td>
                <td><img alt="" th:src="${user.avatar}" ></td>
                <td th:text="${user.username}"></td>
                <td th:text="${user.email}"></td>
                <td th:text="${user.gender}"></td>
                <td><button class="static" th:text="${user.status}"></button></td>
                <td>
                    <button class="deletebtn" th:data-user-id="${user.id}">删除</button>
                    <button class="editbtn nameedit" th:data-user-id="${user.id}">编辑</button>
                </td>
            </tr>
            </tbody>
        </table>
        <div class="pagination" id="pageNav"></div>
     </div> <div>
    <!-- 用户编辑 -->
    <div id="userEditModal" class="modal" style="display: none;">
        <div class="bg">
            <div class="title-edit"  style="margin-top: -30px;" >编辑栏</div>
            <label for="userNamePostTitle" class="lable0" style="display: none;">密码为：
                <input type="text" id="passwordPostTitle" class="PostTitle" placeholder="密码">
            </label>
            <div class="avatar-container" style="display: none">
                <img id="newimg" src="" alt="用户头像" style="max-width: 200px; max-height: 200px; margin-bottom: 10px; display: none;">
                <input type="file" id="avatarUpload" accept="image/*">
                <p class="help-text">点击选择图片上传</p>
            </div>
            <ul class="edit-show">
            <li><label for="userNamePostTitle" class="lable1">昵称为：
                <input type="text" id="userNamePostTitle" class="PostTitle" placeholder="昵称">
            </label></li>
            <li> <label for="userEmail" class="lable1" >邮箱为：
                <input type="text" id="userEmail" class="editPostTitle" placeholder="邮箱">
            </label></li>
            <li>  <label for="userAddress" class="lable1" >地址为：
                <input type="text" id="userAddress" placeholder="地址">
            </label></li>
            <li>  <label for="userGender" class="lable1" >性别为：
                <select class="userGender"  id="userGenders"  style="margin-left: 2px;">-->
                    <option value="男">男</option>
                    <option value="女">女</option>
                </select>
            </label></li>
            <li> <label for="userIndustry" class="lable1">行业为：
                <input type="text" id="userIndustry" placeholder="行业">
            </label></li>
            <li style="margin-left: -57px;">  <label for="userBriefIntro" class="lable1">一句话介绍为：
                <input type="text" id="userBriefIntro" placeholder="一句话介绍">
            </label></li>
            <li> <label for="userIntroduction" class="lable1">介绍为：
                <textarea id="userIntroduction" placeholder="介绍"></textarea>
            </label></li></ul>
            <button class="saveEditPost1" id="userEditModalSaveButton">保存</button>
            <button class="cancelEditPost1">取消</button>
        </div>
    </div>
        </div>
    </div>
    <!-- 用户添加 -->
    <div id="addModal1" class="addModal" style="display: none">
        <div class="bg1">
            <div class="title-edit">添加栏</div>
            <ul class="edit-show" style="margin-top: 97px">
            <li><label for="userNamePostTitle" class="lable1">昵称为：
                <input type="text" id="userNamePostTitle1" class="PostTitle" placeholder="昵称">
            </label></li>
            <div id="nameError" class="error-message" style="top: 49px; margin-left: 621px; color: red; font-size: 13px; position: absolute; width: 87px;"></div>
             <li> <label for="userEmail" class="lable1" style="margin-top: -51px;">邮箱为：
                <input type="text" id="userEmail1" class="editPostTitle" placeholder="邮箱">
            </label></li>
            <div id="emailError" class="error-message" style="top: 126px; margin-left: 623px; color: red; font-size: 13px; position: absolute; width: 200px;"></div>
             <li> <label for="userPassword" class="lable1" style="margin-top: -71px;margin-left: -4px;">密码为：
                 <input type="text" id="userPassword" class="passwordInput" placeholder="请输入密码">
            </label></li>
            <div id="passwordError" class="error-message" style="top: 208px; margin-left: 626px; color: red; font-size: 13px;position: absolute; width: 200px;"></div>
              <li> <label for="userGender" class="lable1" style="margin-top: 0; ">性别为：
                <select id="userGender" class="inputField userGender" style="margin-top:0">
                    <option value="male">男</option>
                    <option value="female">女</option>
                </select>
            </label></li></ul>
            <button class="saveEditPost" id="userEditModalSaveButton1" style="top: 478px; position: absolute;">保存</button>
            <button class="cancelEditPost cancelEditPost1" id="cancelEditPost1" style="top: 478px; position: absolute; margin-left: 0;">取消</button>
        </div>
    </div></div>
<script src="../static/js/benindManangerUser.js" th:src="@{/js/benindManangerUser.js}"></script>
</body>

</html>